package com.yami.shop.bean.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 评论
 *
 * @author 刘聪
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Schema(description = "评论")
@TableName( "tz_article_comment")
public class ArticleComment implements Serializable {

    /**
     * 主键
     */
    @Schema(description = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 评论的回复
     */
    @Schema(description = "评论类型 0:评论 1:评论的回复")
    @TableField(value = "comment_type")
    private String commentType;
    /**
     * 评论/回复内容
     */
    @Schema(description = "评论内容")
    @TableField(value = "content")
    private String content;

    /**
     * 父级评论id
     */
    @Schema(description = "父级评论id")
    @TableField(value = "parent_id")
    private Long parentId;
    /**
     * 评论层级
     */
    @Schema(description = "评论层级")
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 审核状态
     */
    @Schema(description = "审核状态 0:通过")
    @TableField(value = "status")
    private String status;

    /**
     * 文章id
     */
    @Schema(description = "文章id")
    @TableField(value = "article_id")
    private Long articleId;

    /**
     * 评论日期
     */
    @Schema(description = "评论日期")
    @TableField(value = "comment_date")
    private LocalDateTime commentDate;

    /**
     * 点赞量
     */
    @Schema(description = "点赞量")
    @TableField(value = "like_num")
    private Integer likeNum;
    /**
     * 评论人
     */
    @Schema(description = "评论人")
    @TableField(value = "user_id")
    private String userId;


    /**
     * 删除标记
     */
    @Schema(description = "删除标记")
    @TableField(value = "del_flag")
    private String delFlag;

}
